<?php

class AnswerThumbUpController extends BaseController
{
    protected $tableName = "answer_thumb_up";
    protected $pk = "id";

    public function hasThumbUpRecord($user_id, $answer_id) {
        $sql = "SELECT * FROM answer_thumb_up WHERE user_id=$user_id AND answer_id=$answer_id";
        $result = $this->conn->query($sql);
        $data = $this->getSingleDataFromResult($result);
        if (empty($data)) {
            return false;
        }
        else {
            return $data;
        }
    }
}